<extend name="./Apps/Home/View/default/shops/layout.html" />
<block name="content">
<style type="text/css">
#preview{border:1px solid #cccccc; background:#CCC;color:#fff; padding:5px; display:none; position:absolute;}
</style>
<script>
$(document).ready(function(){
    $('.imgPreview').imagePreview();

});
</script>
    <div class="wst-body"> 
       <div class='wst-page-header'>商家中心 > 服务员列表</div>
       <div class='wst-page-content'>
        <div class='wst-tbar-query'>
        <!--店铺分类：<select id='shopCatId1' autocomplete="off" onchange='javascript:getShopCatListForGoods(this.value,"{$object['shopCatId2']}")'>-->
	         <!--<option value='0'>请选择</option>-->
	         <!--<volist name="shopCatsList" id="vo">-->
	         <!--<option value='{$vo['catId']}' <if condition="$shopCatId1 == $vo['catId'] ">selected</if>>{$vo['catName']}</option>-->
	         <!--</volist>-->
	     <!--</select>-->
	     <!--<select id='shopCatId2' autocomplete="off">-->
	         <!--<option value='0'>请选择</option>-->
	     <!--</select>-->

        <table class='wst-list'>
           <thead>
             <tr>
               <th width='40'><input type='checkbox' onclick='javascript:WST.checkChks(this,".chk")'/></th>
               <th>用户名</th>


               <!--<th width="100" >库存<br/>-->
               	<!--<span style='color:red;font-weight:normal;'>(双击可修改)</span>-->
               <!--</th>-->
               <th width='120'>操作</th>
             </tr>
           </thead>
           <tbody>
            <volist name="Page['root']" id="vo" key='i'>
             <tr>
               <td><input class='chk' type='checkbox' value='{$vo['userId']}'/></td>
               <td style="position:relative;" <if condition="$vo['userPhoto'] neq ''">img='{$vo['loginName']}' class='imgPreview'</if>>
               <img class='lazyImg' data-original="__ROOT__/{$vo['userPhoto']}" height="50" width="50"/>
               {$vo['loginName']}
               </td>

               <td>
               <!--<a href="javascript:toViewGoods({$vo['goodsId']})" class='btn view' title='查看'></a>-->
               <a href="javascript:toEditWaiter({$vo['userId']},'editWaiter')" class='btn edit' title='编辑'></a>
               <a href="javascript:delWaiter({$vo['userId']})" class='btn del' title='删除'></a>
               &nbsp;
               </td>
             </tr>
             </volist>
             <tfoot>
             <tr>
                <td colspan='12'>
                <div class="wst-page" style="float:right;padding-bottom:10px;">
						<div id="wst-page-items"></div>
				</div>
                <script>
			    <if condition="$Page['totalPage'] gt 1">
			    $(document).ready(function(){
					laypage({
					    cont: 'wst-page-items',
					    pages: {$Page['totalPage']}, //总页数
					    skip: true, //是否开启跳页
					    skin: '#e23e3d',
					    groups: 3, //连续显示分页数
					    curr: function(){ //通过url获取当前页，也可以同上（pages）方式获取
					        var page = location.search.match(/p=(\d+)/);
					        return page ? page[1] : 1;
					    }(), 
					    jump: function(e, first){ //触发分页后的回调
					        if(!first){ //一定要加此判断，否则初始时会无限刷新
					        	var nuewurl = WST.splitURL("p");
					        	var ulist = nuewurl.split("?");
					        	if(ulist.length>1){
					        		location.href = nuewurl+'&p='+e.curr;
					        	}else{
					        		location.href = '?p='+e.curr;
					        	}
					            
					        }
					    }
					});
			    });
				</if>
				</script>
                </td>
             </tr>
             </tfoot>
           </tbody>
        </table>
        <div class='wst-tbar-group'>
           <span></span>
           <a href='javascript:batchDelWaiter()'><span class='del btn'></span>删除</a>
        </div>
        </div>
    </div>
</block> 